<?php
/**
 * Created by Command.
 * User: Vito
 */

namespace app\admin\curd\polling_type;

use app\common\curd\Delete;
use app\model\PollingType;

class PollingTypeDelete extends Delete
{
    //排除的数据
    protected $exclude = [];
    //条件
    protected $where = [];

    protected function deleteMiddleware($next,$model){
        $respose = $next($model);
        $id = $this->params['id'];
        // halt($id);
        $where['pid'] = $id;
        $pollingType = new PollingType;

        $pollingType->deletePollingType($where);
        
        return $respose;
    }
}